import Mock from "mockjs";
let data = Mock.mock({
  "data|10": [
    {
      "date|1": [
        "光明公司总部领导",
        "光明公司总部客户服务中心",
        "光明公司总部科研处",
        "光明公司宣传部",
        "光明公司组织部",
      ],
      img: "@color",
      name: "@cname",
      "job|1": ["职员", "总监", "产品经理", "组织部长", "财务总监"],
      "apply|1": ["正在审核", "审核通过", "审核失败"],
    },
  ],
});
class StudentsService {
  getData() {
    return Promise.resolve({
      data,
    });
  }
  delete(id) {
    data.data = data.data.filter((item) => item.goodsID !== id);
    return Promise.resolve(true);
  }
  search(name) {
    data.data = data.data.filter((item) => item.name === name);
    return Promise.resolve(true);
  }
}

const service = new StudentsService();

export default service;
